package chances.wechat.utils;

import java.rmi.RemoteException;

import chances.wechat.msggw.context.QrContext;
import chances.wechat.msggw.resp.QrResponse;
import chances.wechat.service.BindService;

public class QrUtils {

	public static String getBindUrl(String stbNo, String scene, String location, BindService bindService) {
		String qrcodeurl = null;
		QrContext qrContext = new QrContext("getqrcode");
		qrContext.setIptvacct(stbNo);
		qrContext.setStbtype(scene);
		qrContext.setEpgversion(location);
		QrResponse qrResponse;
		try {
			qrResponse = bindService.getQrCode(qrContext);
			qrcodeurl = qrResponse.getQrcodeurl();
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return qrcodeurl;
	}

}
